<template>
  <div class="app-container">
    <el-tabs v-model="activeName">
      <el-tab-pane label="基础" name="base">
        <form-admin
          :id="id"
          v-model="form"
          entity-conf="Specification"
          :fields="specificationFormFields"
        />
      </el-tab-pane>
    </el-tabs>
  </div>
</template>

<script>
import FormAdmin from '@/components/EasyAdmin/FormAdmin'
import admin from '@/config'

export default {
  components: { FormAdmin },
  data() {
    return {
      form: this.$route.query,
      id: Number(this.$route.params.id),
      activeName: this.$route.hash ? 'raw' : 'base',
      rawSpecificationForm: { specification: this.$route.params.id },
      specificationFormFields: admin.entities['Specification'].form.fields,

      // dialog
      dialogShow: false,
      dialogRefreshKey: 0
    }
  }
}
</script>
